package com.example.demo.config

import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.scheduling.TaskScheduler
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler


@Configuration
class ScheduledConfig {
    @Bean
    fun taskScheduler(): TaskScheduler {
        val scheduling = ThreadPoolTaskScheduler()
        scheduling.poolSize = 10
        scheduling.initialize()
        return scheduling
    }
}